/**
 * Created by baidm in 2022/4/7 on 15:41
 */
const packageName = require("./package.json").name;

module.exports = {
  outputDir: `../dist/${packageName}`,
  publicPath: process.env.VUE_APP_BASE_URL,
  configureWebpack: {
    resolve: {
      alias: {
        "src": "@",
      }
    },
    output: {
      library: `${packageName}-[name]`,
      libraryTarget: 'umd', // 把微应用打包成 umd 库格式
      // jsonpFunction: `webpackJsonp_${packageName}`,
    },
  },
  productionSourceMap: false,
  devServer: {
    host: '0.0.0.0',
    port: 10030,
    hot: true,
    headers: {
      'Access-Control-Allow-Origin': '*',// 主应用获取子应用时跨域响应头
    },
  }
}
